package com.wang.controller;


import com.wang.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PersonController {
    @Autowired
    private Person person;
    @GetMapping("/p1")
    @ResponseBody
    public Person person01(){
        return person;
    }

    @GetMapping("/b.html")
    @ResponseBody
    public String html01(){
        return "B";
    }
}
